package com.fjp.heartguard.viewmodel

import androidx.databinding.ObservableField
import androidx.lifecycle.MutableLiveData
import com.fjp.heartguard.app.base.HTBaseViewModel
import com.fjp.heartguard.app.data.bean.ReportsDetail
import com.fjp.heartguard.app.data.bean.ReportsItem
import com.fjp.heartguard.app.network.HttpRequestCoroutine
import me.hgj.jetpackmvvm.ext.request
import me.hgj.jetpackmvvm.state.ResultState

/**
 *Author:Mr'x
 *Time:2025/1/19
 *Description:
 */
class ReportDetailViewModel : HTBaseViewModel() {
    val reportsItem = ObservableField<ReportsItem>()
    var reportsDetail = MutableLiveData<ResultState<ReportsDetail>>()
    fun getQuestionnaireInfo(id: Int) {
        request({
            HttpRequestCoroutine.getQuestionnaireInfo(id)
        }, reportsDetail, true,"正在获取评估结果...")

    }
}